Set modules path first:
In [1]:
import sys
#sys.path.insert(0, '/home/asanso/workspace/att-spyder/att/src/python/')
sys.path.insert(0, 'i:/dev/workspaces/python/att-workspace/att/src/python/')
Let's parse
In [2]:
from hit.process.processor import ATTMatrixHitProcessor
from hit.process.processor import ATTPlainHitProcessor
plainProcessor = ATTPlainHitProcessor()
matProcessor = ATTMatrixHitProcessor()
Parse a Hit with Plain Processor
In [3]:
plainHit = plainProcessor.parse_hit("hit: {0:25 1549:4 2757:4 1392:4 2264:7 1764:7 1942:5 2984:5 r}")
print plainHit
Compute diffs:
In [4]:
plainDiffs = plainProcessor.hit_diffs(plainHit["sensor_timings"])
print plainDiffs
Parse a Hit with Matrix Processor
In [5]:
matHit = matProcessor.parse_hit("hit: {0:25 1549:4 2757:4 1392:4 2264:7 1764:7 1942:5 2984:5 r}")
print matHit
Compute diffs:
In [6]:
matDiffs = matProcessor.hit_diffs((matHit["sensor_timings"]))
print matDiffs
In [7]:
matDiffs
Out[7]:
In [ ]: